import request from "@/utils/request";

const VTROLL_BASE_URL = "/api/v1/vt-roll";

const VtRollAPI = {
  /** 获取卷膜数量价格对照分页数据 */
  getPage(queryParams) {
    return request({
      url: `${VTROLL_BASE_URL}/page`,
      method: "get",
      params: queryParams,
    });
  },

  /** 获取卷膜数量价格对照表单数据 */
  getFormData(id) {
    return request({
      url: `${VTROLL_BASE_URL}/${id}/form`,
      method: "get",
    });
  },

  /** 添加卷膜数量价格对照 */
  add(data) {
    return request({
      url: `${VTROLL_BASE_URL}`,
      method: "post",
      data: data,
    });
  },

  /** 更新卷膜数量价格对照 */
  update(id, data) {
    return request({
      url: `${VTROLL_BASE_URL}/${id}`,
      method: "put",
      data: data,
    });
  },

  /** 批量删除卷膜数量价格对照，多个以英文逗号(,)分割 */
  deleteByIds(ids) {
    return request({
      url: `${VTROLL_BASE_URL}/${ids}`,
      method: "delete",
    });
  },
};

export default VtRollAPI;
